﻿using System.Runtime.InteropServices;

namespace Newbe.MPQ.Framework
{
    /// <summary>
    /// 暴露非托管代码的api集合
    /// </summary>
    public sealed class PluginApiExporter
    {
        [DllExport("info")]
        public static string GetInfo() => PluginInstanceManager.GetInstance().GetInfo();

        [DllExport("EventFun")]
        public static int EventFun(string receiverQq, int eventType, int eventAdditionType, string fromNum,
            string eventOperator,
            string triggee,
            string message, string rawMessage) => PluginInstanceManager.GetInstance()
            .EventFun(receiverQq, eventType, eventAdditionType, fromNum, eventOperator, triggee, message, rawMessage);

        [DllExport("set")]
        public static void Set() => PluginInstanceManager.GetInstance().Set();


        [DllExport("about")]
        public static void About() => PluginInstanceManager.GetInstance().About();


        [DllExport("end")]
        public static int End() => PluginInstanceManager.GetInstance().End();
    }
}